package TreeNode;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-06-06
 * Time: 21:38
 */
public class Main {
    public static void main(String[] args) {
        binarySearchTree binarysearchTree = new binarySearchTree();
        int[] array = {8,4,3,1,15,18,22,11,2};
        for (int i = 0; i < array.length; i++) {
            binarysearchTree.insert(array[i]);
        }

       /* binarysearchTree.inorder(binarysearchTree.root);*/
        binarySearchTree.TreeNode node = binarysearchTree.search(99);
        System.out.println(node.key);
    }
}
